package ifreecomm.nettydemo.netty;

import java.util.Arrays;

/**
 * Created by wang on 2018/12/29.
 */

public class AutoBrainProtocol {
    /**
     *消息头
     */
    private int head_data=ConstantValue.HEAD_DATA;
    private int second_data=ConstantValue.HEAD_DATA;
    /**
     * 消息的长度
     */
   // private int contentLength;

    public int getSecond_data() {
        return second_data;
    }

    public void setSecond_data(int second_data) {
        this.second_data = second_data;
    }

    /**
     * 消息的内容
     */
    private byte[] content;

    /**
     * 用于初始化，SmartCarProtocol
     *
     *
     *
     * @param content
     *            协议里面，消息的数据
     */
    public AutoBrainProtocol(byte[] content) {
       // this.contentLength=contentLength;
        this.content = content;
    }

    public  int getHead_data() {
        return head_data;
    }
    public void setHead_data(int head_data) {
        this.head_data = head_data;
    }

   /* public int getContentLength() {
        return contentLength;
    }

   public void setContentLength(int contentLength) {
       this.contentLength = contentLength;
    }*/

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }

    /*@Override
    public String toString() {
        return "SmartCarProtocol [head_data=" + head_data + ", contentLength="
                + contentLength + ", content=" + Arrays.toString(content) + "]";
    }*/
    @Override
    public String toString() {
        return "SmartCarProtocol [head_data=" + head_data
                 + ", content=" + Arrays.toString(content) + "]";
    }

}
